/*
 * lib2Desa - Another 2D game library in C++
 * Copyright (C) 2009 Erivaldo Xavier de Lima Filho
 *
 * This program is free software and is distributed under GNU General Public License version 3. You can modify and/or redistribute
 * it under the terms of GPL version 3 or posterior version. This program comes with NO WARRANTY, for more details, see LICENSE,
 * or <http://www.gnu.org/licenses>.
 *
 * Contact info:
 *
 *	Erivaldo Xavier de Lima Filho, desadoc@gmail.com
 *
 */

#ifndef _FRAMEPICKER_HPP
#define _FRAMEPICKER_HPP

//#include "Core/RefCounter.hpp"
#include "Core/SpriteSequence.hpp"
#include "Core/ISprite.hpp"

#ifndef _NO_NAMESPACE
namespace lib2Desa {
#endif

class FramePicker
{

private:

	shared_ptr<SpriteSequence> seq;
	f32 fps;

public:

	FramePicker(const shared_ptr<SpriteSequence>& s, f32 framesPerSec);
	~FramePicker(void);

	const shared_ptr<ISprite> getFrame(u32 time) const;
	shared_ptr<SpriteSequence> getSequence(void) const;
};


#ifndef _NO_NAMESPACE
}
#endif

#endif /*FramePicker.hpp included*/
